package com.crm.jdy.common.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.crm.jdy.common.vo.PageVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TeamInfoDto extends PageVO implements Serializable {

    private static final long serialVersionUID = 138630990L;

    @TableId(value = "team_id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(name = "teamId" , value = "团队主键id")
    private String teamId;

    @NotBlank(message = "团队名字非空")
    @ApiModelProperty(name = "teamName" , value = "团队名字")
    private String teamName;

    @ApiModelProperty(name = "teamNum" , value = "团队人数")
    private String teamNum;

    @ApiModelProperty(name = "teamRole" , value = "职责")
    private String teamRole;

    @ApiModelProperty(name = "teamRight" , value = "成员权限")
    private String teamRight;

    @NotNull(message = "团队成员id不能为空")
    @ApiModelProperty(name = "teamCid" , value = "团队成员id")
    private String teamCid;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "createTime" , value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "updateTime" , value = "更新最新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @JsonIgnore
    @TableLogic
    @ApiModelProperty(name = "isDelete" , value = "0正常  1删除")
    private Integer isDelete;


}
